export const getColumns = ({ isNameSearch, isMobilephoneSearch } = { isNameSearch: false, isMobilephoneSearch: false}) => {
  return [
    {
      title: '头像',
      dataIndex: 'pic',
      search: false,
      // eslint-disable-next-line jsx-a11y/alt-text
      render: (_, record) => {
        if (record.pic) {
          return <img src={_} style={{ width: '60px', objectFit: 'cover', }} />
        } else {
          return '-';
        }
      }
    },
    {
      title: '姓名',
      dataIndex: 'name',
      search: isNameSearch,
      ellipsis: true,
    },
    {
      title: '邮箱',
      dataIndex: 'email',
      search: false,
      ellipsis: true,
    },
    {
      title: '手机号',
      dataIndex: 'mobilephone',
      search: isMobilephoneSearch,
      ellipsis: true,
    },
    {
      title: '班级标签',
      dataIndex: 'classRemark',
      search: false,
      ellipsis: true,
    },
    {
      title: '单位',
      dataIndex: 'address',
      search: false,
      ellipsis: true,
    },
    {
      title: '身份证',
      dataIndex: 'idcard',
      search: false,
      ellipsis: true,
    },
    {
      title: '备注',
      dataIndex: 'remark',
      search: false,
      ellipsis: true,
    },
    {
      title: '班级',
      dataIndex: 'className',
      hideInTable: true,
      search: false,
    },
  ]
}